package cn.kuang.controller;

import cn.kuang.pojo.Role;
import cn.kuang.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 徽州大都督
 * @date 2020/7/19
 */
@RestController
@RequestMapping("role")
public class RoleController {

    @Autowired
    private RoleService roleService;

    @GetMapping("findAll")
    public List<Role> findAll(){
        return roleService.findAll();
    }
}
